﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SampleData.aspx.cs" Inherits="Trangtrai.SampleData" MasterPageFile="~/SiteMaster.Master" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Xpo.v11.1.Web, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Xpo" tagprefix="dx" %>

<asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
     <center>
        <br /><br /><br /><br />
         <table width="960px">
            <tr>
                <td colspan="2" bgcolor="#45829F" align="center">
                    
                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" 
                        Text="DỮ LIỆU MẪU CHO 100,000 CON POST" Font-Bold="true" ForeColor="White" Font-Size="Large">
                    </dx:ASPxLabel>
                    
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <dx:ASPxGridView ID="ASPxGridView1" runat="server" Width="960px" 
             AutoGenerateColumns="False" KeyFieldName="TOM_AGE" 
             CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" CssPostfix="Office2003Blue" 
             DataSourceID="SqlDataSource1">
             <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                 CssPostfix="Office2003Blue">
                 <Header ImageSpacing="5px" SortingImageSpacing="5px">
                 </Header>
                 <LoadingPanel ImageSpacing="10px">
                 </LoadingPanel>
             </Styles>
             <SettingsPager>
                 <AllButton Text="All">
                 </AllButton>
                 <NextPageButton Text="Next &gt;">
                 </NextPageButton>
                 <PrevPageButton Text="&lt; Prev">
                 </PrevPageButton>
             </SettingsPager>
             <ImagesFilterControl>
                 <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                 </LoadingPanel>
             </ImagesFilterControl>
             <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                 <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                 </LoadingPanelOnStatusBar>
                 <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                 </LoadingPanel>
             </Images>
             <Columns>
                 <dx:GridViewDataTextColumn FieldName="TOM_AGE" VisibleIndex="0" 
                     Caption="Ngày tuổi">
                 </dx:GridViewDataTextColumn>
                 <dx:GridViewDataTextColumn FieldName="RATE_GROWTH" VisibleIndex="1" 
                     Caption="Độ tăng trưởng">
                 </dx:GridViewDataTextColumn>
                 <dx:GridViewDataTextColumn FieldName="FOOD_NAME" VisibleIndex="2" 
                     Caption="Loại thức ăn">
                 </dx:GridViewDataTextColumn>
                 <dx:GridViewCommandColumn ButtonType="Image" Caption="Xóa" VisibleIndex="5">
                     <DeleteButton Visible="True">
                         <Image Url="~/Image/delete.PNG">
                         </Image>
                     </DeleteButton>
                     <ClearFilterButton Visible="True">
                     </ClearFilterButton>
                 </dx:GridViewCommandColumn>
                 <dx:GridViewCommandColumn ButtonType="Image" Caption="Thêm" VisibleIndex="4">
                     <NewButton Visible="True">
                         <Image Url="~/Image/add.png">
                         </Image>
                     </NewButton>
                     <CancelButton>
                         <Image Url="~/Image/delete.PNG">
                         </Image>
                     </CancelButton>
                     <UpdateButton>
                         <Image Url="~/Image/save.PNG">
                         </Image>
                     </UpdateButton>
                     <ClearFilterButton Visible="True">
                     </ClearFilterButton>
                 </dx:GridViewCommandColumn>
                 <dx:GridViewDataTextColumn FieldName="AMOUNT" VisibleIndex="3" 
                     Caption="Lượng thức ăn (kg)">
                 </dx:GridViewDataTextColumn>
             </Columns>
             <Settings ShowFilterRow="True" />
             <StylesEditors>
                 <ProgressBar Height="25px">
                 </ProgressBar>
             </StylesEditors>
         </dx:ASPxGridView>
                </td>
            </tr>
            <tr>
                <td align="left" class="style1">
                    
                    <dx:ASPxButton ID="btnSave" runat="server" 
                        CssFilePath="~/App_Themes/SoftOrange/{0}/styles.css" CssPostfix="SoftOrange" 
                        SpriteCssFilePath="~/App_Themes/SoftOrange/{0}/sprite.css" Text="Lưu">
                    </dx:ASPxButton>
                    
                </td>
                <td>
                
                </td>
            </tr>
         </table>
         <br />
         <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
             ConnectionString="<%$ ConnectionStrings:TOM_MSConnectionString %>" 
             
             SelectCommand="SELECT SAMPLE_DATA.TOM_AGE, SAMPLE_DATA.RATE_GROWTH, FOOD.FOOD_NAME, SAMPLE_DATA.AMOUNT FROM FOOD INNER JOIN SAMPLE_DATA ON FOOD.FOOD_ID = SAMPLE_DATA.FOOD_ID">
         </asp:SqlDataSource>
     </center>
     <center>
        <table width="960px">
            <tr>
                <td class="style2" bgcolor="#45829F" align="center">
                    
                    <dx:ASPxLabel ID="ASPxLabel2" runat="server" 
                        Text="TỈ LỆ NỒNG ĐỘ HÓA CHẤT" Font-Bold="true" Font-Size="Large" ForeColor="White">
                    </dx:ASPxLabel>
                    
                </td>
            </tr>
            <tr>
                <td>
                    
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:trangtraitomConnectionString %>" 
                        SelectCommand="SELECT * FROM [Chemical]"></asp:SqlDataSource>
                    
                    <dx:ASPxGridView ID="ASPxGridView2" runat="server" Width="960px" 
                        AutoGenerateColumns="False"  KeyFieldName="ChemicalCode"
                        CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                        CssPostfix="Office2003Blue" DataSourceID="SqlDataSource2">
                        <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                            CssPostfix="Office2003Blue">
                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                            </Header>
                            <LoadingPanel ImageSpacing="10px">
                            </LoadingPanel>
                        </Styles>
                        <ImagesFilterControl>
                            <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                            </LoadingPanel>
                        </ImagesFilterControl>
                        <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                            </LoadingPanelOnStatusBar>
                            <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <Columns>
                            <dx:GridViewDataTextColumn Caption="Mã" FieldName="ChemicalCode" 
                                VisibleIndex="0">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Tên hóa chất" FieldName="ChemicalName" 
                                VisibleIndex="1">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Nồng độ" FieldName="Concentration" 
                                VisibleIndex="2">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Đơn vị hóa chất" FieldName="ChemicalUnit" 
                                VisibleIndex="3">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Loại môi trường" FieldName="KindEnvi" 
                                VisibleIndex="4">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewCommandColumn ButtonType="Image" Caption="Xóa" VisibleIndex="8">
                                <DeleteButton Visible="True">
                                    <Image Url="~/Image/delete.PNG">
                                    </Image>
                                </DeleteButton>
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dx:GridViewCommandColumn>
                            <dx:GridViewCommandColumn ButtonType="Image" Caption="Sửa" VisibleIndex="7">
                                <EditButton Visible="True">
                                    <Image Url="~/Image/modify.PNG">
                                    </Image>
                                </EditButton>
                                <CancelButton>
                                    <Image Url="~/Image/delete.PNG">
                                    </Image>
                                </CancelButton>
                                <UpdateButton>
                                    <Image Url="~/Image/save.PNG">
                                    </Image>
                                </UpdateButton>
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dx:GridViewCommandColumn>
                            <dx:GridViewCommandColumn VisibleIndex="6" ButtonType="Image" Caption="Thêm">
                                <NewButton Visible="True">
                                    <Image Url="~/Image/add.png">
                                    </Image>
                                </NewButton>
                                <CancelButton>
                                    <Image Url="~/Image/delete.PNG">
                                    </Image>
                                </CancelButton>
                                <UpdateButton>
                                    <Image Url="~/Image/save.PNG">
                                    </Image>
                                </UpdateButton>
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dx:GridViewCommandColumn>
                            <dx:GridViewDataTextColumn Caption="Đơn vị môi trường" FieldName="UnitEnvi" 
                                VisibleIndex="5">
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <Settings ShowFilterRow="True" />
                        <StylesEditors>
                            <ProgressBar Height="25px">
                            </ProgressBar>
                        </StylesEditors>
                    </dx:ASPxGridView>
                    
                </td>
            </tr>
            <tr>
                <td align="left">
                    
                    <dx:ASPxButton ID="btnSave2" runat="server" 
                        CssFilePath="~/App_Themes/SoftOrange/{0}/styles.css" CssPostfix="SoftOrange" 
                        SpriteCssFilePath="~/App_Themes/SoftOrange/{0}/sprite.css" Text="Lưu">
                    </dx:ASPxButton>
                    
                </td>
            </tr>
        </table>
     </center>
</asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="head">

    <script type="text/javascript" src="../../js/jquery-latest.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {

            $("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav

            $("ul.topnav li span").click(function() { //When trigger is clicked...

                //Following events are applied to the subnav itself (moving subnav up and down)
                $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click

                $(this).parent().hover(function() {
                }, function() {
                    $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
                });
                ;
                //Following events are applied to the trigger (Hover events for the trigger)
            }).hover(function() {
                $(this).addClass("subhover"); //On hover over, add class "subhover"
            }, function() {	//On Hover Out
                $(this).removeClass("subhover"); //On hover out, remove class "subhover"
            });

        });
    </script>
    <style type="text/css">
        .style1
        {
            width: 159px;
        }
        .style2
        {
            height: 18px;
        }
    </style>

</asp:Content>

